package com.stedu.mall.common.service;

import com.github.pagehelper.PageInfo;
import com.stedu.mall.common.bean.Admin;
import com.stedu.mall.common.exception.MallException;

public interface AdminService {
    //登录
    Admin login(String username, String password) throws MallException;
    //修改密码
    Boolean chgPwd(String oldPwd, String newPwd, Integer id) throws MallException;
    //添加
    Boolean  insert(Admin admin) throws MallException;
    //根据id删除
    Boolean  delete(Integer id) throws MallException;
    //根据id修改
    Boolean update(Admin admin) throws MallException;
    //根据id查询
    Admin selectById(Integer id);
    //搜索 —— 分页查询
    PageInfo<Admin> selectByCondition(Admin condition, Integer pageNum, Integer pageSize);
}
